<template>
  <div>
    <h2>child</h2>
    {{ $store.state.app.title }}
  </div>
</template>
<script setup>
import { inject } from 'vue';
const foo = inject('foo');
const event = inject('event');
console.log(foo.name);
event.getData('子组件的数据');
</script>
